

<template>
  <router-view></router-view>
  <van-tabbar v-model="active" active-color="#ee0a24" v-if="!isShow">
    <van-tabbar-item icon="home-o" to="/index">首页</van-tabbar-item>
    <van-tabbar-item icon="apps-o" to="/item/cateList">分类</van-tabbar-item>
    <van-tabbar-item icon="bag-o" to="/topic/index">值得买</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart-o" to="/item/cart">购物车</van-tabbar-item>
    <van-tabbar-item icon="user-o" to="/user">个人</van-tabbar-item>
  </van-tabbar>
</template>

<script setup lang="ts">
import { onMounted, ref, watch } from 'vue'
import { showToast } from 'vant'
import { useRouter } from 'vue-router';
const active = ref(0)
const router = useRouter()
let isShow = ref(router.currentRoute.value.meta.isHidden)

watch(() => router.currentRoute.value.path, (newValue, oldValue) => {

  isShow.value = router.currentRoute.value.meta.isHidden
  // console.log(router.currentRoute.value);

  // console.log(isShow.value);

})
</script>

<style scoped lang="less">
html,
body,
#app {
  height: 100%;
}
</style>
